package com.chenpeijian.demo.service;

import com.burukeyou.uniapi.http.annotation.HttpApi;
import com.burukeyou.uniapi.http.annotation.param.BodyJsonPar;
import com.burukeyou.uniapi.http.annotation.param.HeaderPar;
import com.burukeyou.uniapi.http.annotation.param.QueryPar;
import com.burukeyou.uniapi.http.annotation.request.GetHttpInterface;
import com.burukeyou.uniapi.http.annotation.request.PostHttpInterface;
import com.burukeyou.uniapi.http.core.response.HttpResponse;
import com.chenpeijian.demo.service.dto.Add4DTO;

/**
 * @program: student_code
 * @description: http请求调用
 * @author: 陈培建
 * @create: 2025-01-17 11:20
 * https://mp.weixin.qq.com/s/iKTyydSEjwI0Cyxy89u-dQ
 **/
//@HttpApi(url = "http://localhost:8888")
@HttpApi(url = "${channel.mtuan.url}")
public interface  UserHttpApi {
    @GetHttpInterface("/getUser")
    String getUser(@QueryPar("name") String param, @HeaderPar("userId") Integer id);

    @PostHttpInterface("/addUser")
    Add4DTO addUser(@BodyJsonPar Add4DTO req);
    @PostHttpInterface("/addUser")
    HttpResponse<Add4DTO> addUserStatus(@BodyJsonPar Add4DTO req);
}
